<div class="row">
  <br>
  <form>
    <div class="form-group col-xs-2">
      <label class="control-label">Source Type</label>
      <select ng-model="search_smart_scripts.source_type" class="form-control">
        <option value="0">0 - CREATURE</option>
        <option value="1">1 - GAMEOBJECT</option>
        <option value="2">2 - AREATRIGGER</option>
        <option value="9">9 - TIMED_ACTIONLIST</option>
      </select>
    </div>
    <div class="form-group col-xs-2">
      <label class="control-label">Entry or GUID</label>
      <input class="form-control" type="text" placeholder="Entry or GUID" ng-model="search_smart_scripts.entryorguid">
    </div>
    <div class="form-group col-xs-2">
      <label class="control-label">Comment</label>
      <input class="form-control" type="text" placeholder="Comment" ng-model="search_smart_scripts.comment">
    </div>
    <div class="col-xs-1">
      <button type="submit" class="btn btn-primary" ng-click="search(search_smart_scripts.source_type, search_smart_scripts.entryorguid, search_smart_scripts.comment)" style="margin-top: 25px">Search</button>
    </div>
  </form>
  <div class="col-xs-5" ng-show="foundExactResult">
    <p class="lead" style="margin-top: 30px"><a ng-href="./#/sai/{{ exactResult.sourceType }}/{{ exactResult.entryOrGuid }}"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> Open {{ exactResult.sourceTypeName }} {{ exactResult.entryOrGuid }} script</a></p>
  </div>
</div>
<br>
<table class="table table-striped table-condensed" ts-wrapper>
  <thead>
    <th class="text-center" ts-criteria="source_type|parseInt">SourceType</th>
    <th class="text-center" ts-criteria="entryorguid|parseInt">EntryOrGuid</th>
  </thead>
  <tbody>
    <tr ng-repeat="script in scripts" ts-repeat>
      <td><a>{{ script.source_type }}</a></td>
      <td><a ng-href="./#/sai/{{ script.source_type }}/{{ script.entryorguid }}">{{ script.entryorguid }}</a></td>
    </tr>
  </tbody>
</table>
